package com.wuzhiming.istudy.service.impl;

import com.wuzhiming.istudy.pojo.CourseType;
import com.wuzhiming.istudy.service.BaseService;
import com.wuzhiming.istudy.service.CourseTypeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: CourseTypeServiceImpl
 * @Description:
 * @Author:zhimingw
 * @Version 1.0
 * @since 2022/2/27 13:35
 */
@Service("courseTypeService")
public class CourseTypeServiceImpl extends BaseService implements CourseTypeService {
    @Override
    public boolean insert(CourseType courseType) {
        if(courseTypeMapper.insert(courseType)==1){
            return true;
        }
        return false;
    }

    @Override
    public List<CourseType> queryAll() {
        return courseTypeMapper.queryAll();
    }

    @Override
    public Integer getCount(Integer status) {
        return courseTypeMapper.getCount(status);
    }

    @Override
    public CourseType queryById(Integer id) {
        return courseTypeMapper.queryById(id);
    }

    @Override
    public boolean update(CourseType courseType) {
        if(courseTypeMapper.update(courseType)==1){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteById(Integer id) {
        if(courseTypeMapper.deleteById(id)==1){
            return true;
        }
        return false;
    }
}
